#include <stdio.h>
int maxAscendingSum(int* nums, int numsSize) {
	if (numsSize == 1)
		return  *nums;
	int i = 0;
	int sum = 0;
	int max = nums[0];
	while (i < numsSize)
	{
		if (i + 1 == numsSize)
		{
			sum += nums[i];
			max = (max > sum) ? max : sum;
			sum = 0;
			break;
		}

		if (nums[i] < nums[i + 1])
		{
			sum += nums[i];

		}
		else
		{
			sum += nums[i];
			max = (max > sum) ? max : sum;
			sum = 0;
		}
		
		i++;
	}
	return max;
}


int main() {

	int arr[10] = {1, 2, 3, 4, 2, 7, 6, 9, 8, 100};
	int ret = maxAscendingSum(arr, 10);
	printf("%d\n", ret);
	return 0;
}